package com.tz.crm.service.impl;

import com.tz.crm.dao.VisitTypeDao;
import com.tz.crm.entity.VisitType;
import com.tz.crm.service.VisitTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 拜访方式
 */
@Service
@Transactional
public class VisitTypeServiceImpl extends BaseServiceImpl<VisitType, String> implements VisitTypeService {

    @Autowired
    private VisitTypeDao visitTypeDao;

    /**
     * 有参构造
     *
     * @param visitTypeDao 注入的 VisitTypeDao 组件
     */
    @Autowired
    public VisitTypeServiceImpl(VisitTypeDao visitTypeDao) {
        this.visitTypeDao = visitTypeDao;
        super.setBaseDao(visitTypeDao);
    }

    @Override
    public List<VisitType> getAllOrderBySeq() {
        return visitTypeDao.getAllOrderBySeq();
    }

    @Override
    public VisitType findByValue(String value) {
        return visitTypeDao.findByValue(value);
    }

}
